package com.ruoyi.web.controller.epm;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.service.IEpmBirthdayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Empment/birthday")
public class EpmBirthdayController extends BaseController {
    @Autowired
    private IEpmBirthdayService iEpmBirthdayService;

    /**
     * 根据生日月份查询员工信息
     */
    @PreAuthorize("@ss.hasPermi('Empment:birthday:list')")
    @GetMapping(value = "/{month}")
    public TableDataInfo getBirthMonthInfo(@PathVariable("month") int month)
    {
        startPage();
        return getDataTable(iEpmBirthdayService.selectEpmInformationByBirthMonth(month));
    }
}
